using System;
using System.Collections;
using Microsoft.Office.Interop.InfoPath.SemiTrust;
using System.Xml;
using InfoJetSoft.Service.Util;
using InfoJetSoft.Service.Entity;

namespace InfoJetSoft.Service.ManagedCode
{
	/// <summary>
	/// Summary description for XMLImplementation.
	/// </summary>
	public class XMLImplementation : IXMLDOMImplementation
	{
		private Form form = null;
		private XmlImplementation xmlImplementation = null;

		public XMLImplementation( Form frm, XmlImplementation implementation )
		{
			this.form = frm;
			this.xmlImplementation = implementation;
		}

		public XmlImplementation XmlImplementation
		{
			get
			{
				return this.xmlImplementation;
			}
		}

		public static XMLImplementation createXMLImplementation( Form frm, XmlImplementation implementation )
		{
			if( implementation != null )
			{
				return new XMLImplementation( frm, implementation );
			}
			else
			{
				return null;
			}
		}

		//IXMLDOMImplementation Interface Implementation
		public bool hasFeature(string feature, string version)
		{
			return this.xmlImplementation.HasFeature( feature, version );	
		}

	}
}
